import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from "../views/Login";
import Home from "../views/Home";
import Test1 from "../views/userManage/userList";
import Test3 from "../views/roleManage/roleList";
import Test2 from "../views/rootManage/rootList";
import equipManage from "../views/equipManage/equipManage";
Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    name: 'Login',
    component: Login,
    hidden:true
  },
  {
    path: '/home',
      name: '用户管理',
    component: Home,
    children:[
      {
        path: '/userList',
        name: '查询用户列表',
        component: Test1
      }
    ]
  },
  {
    path: '/home',
    name: '角色管理',
    component: Home,
    children:[
      {
        path: '/roleList',
        name: '查询角色列表',
        component: Test3
      }
    ]

  },
  {
    path: '/home',
    name: '权限管理',
    component: Home,
    children:[
      {
        path: '/rootList',
        name: '权限更新',
        component: Test2
      }
    ]
  },
  {
    path: '/home',
    name: '器材管理',
    component: Home,
    children:[
      {
        path: '/equipManage',
        name: '器材管理',
        component: equipManage
      }
    ]
  }

]
const router = new VueRouter({
  routes
})

export default router
